package main

import (
	"fmt"

	"struct_case/model"
)

func main() {
	fmt.Println("测试")

	// 声明一个空结构体 零值初始化
	u := model.User{}

	// ❌ too few values in struct literal of type User
	// u = User{"xy", 18}

	// ❌ implicit assignment to unexported field _ in struct literal of type model.User
	// u = model.User{"xy", 15, struct{}{}}
	// fmt.Println(u)

	// 声明一个结构体并赋值 具名字段初始化
	u = model.User{Name: "wdq", Age: 10}
	fmt.Println(u)

	// 声明一个结构体并赋值 具名字段初始化
	u = model.User{
		Name: "Alice",
		Age:  20,
	}
	fmt.Println(u)
}
